package com.qiyu.tech.search;

import com.qiyu.core.cache.redis.annotation.CacheDataSource;
import com.qiyu.datasource.annotation.AppDataSource;
import com.qiyu.datasource.enums.DatasourceConfigEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import static com.qiyu.core.cache.redis.config.RedisEnvConstatns.RedisEnvEnum.DEFAULT_DB;

/**
 * @Author linhao
 * @Date created in 3:28 下午 2020/12/21
 */
@Slf4j
@SpringBootApplication(scanBasePackages = "com.qiyu.*")
@CacheDataSource(cacheType = DEFAULT_DB)
@AppDataSource(datasourceType = {DatasourceConfigEnum.ONLINE_DB},defaultType = DatasourceConfigEnum.ONLINE_DB)
public class SearchApplication {

    public static void main(String[] args) {
        SpringApplication.run(SearchApplication.class,args);
        log.info("=========== SearchApplication is started ============");
    }
}
